home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-04-05 | 400 b | 21 lines | [TEXT/KEEN] |
- # $SortTest_Nums - test the builtin sort command
-
-
- BEGIN {
- for (i = 1; i <= 100; ++i)
- a[i] = int(1000*rand())+1
- for (i = 1; i <= 100;)
- {
- print a[i], a[i+1], a[i+2], a[i+3], a[i+4]
- i += 5
- }
- max = sort(a,ind,"n");
- print "now sorted:"
- print "max is", max
- for (i = 1; i <= 100;)
- {
- print a[ind[i]], a[ind[i+1]], a[ind[i+2]],
- a[ind[i+3]], a[ind[i+4]]
- i += 5
- }
- }